#include "widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
}

Widget::~Widget()
{
}

void Widget::paintEvent(QPaintEvent *event){
    Q_UNUSED(event);

    QString img_full_name;

    QPainter painter(this);
    img_full_name = QString("%1/%2").arg("resources").arg("browser.png");

    QImage image(img_full_name);

    painter.drawPixmap(0,0,
                       QPixmap::fromImage(
                           image.scaled(100,100,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));



    painter.end();


}


void Widget::resizeEvent(QResizeEvent *event){
    Q_UNUSED(event);

    qDebug("[Resize Event call]");
    qDebug("width : %d,height : %d",this->width(),this->height());


}


